package com.yanqu.road.entity.activity.sonhai.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@FieldTypeAnnotation(tableName = "t_c_activity_son_hai_team_data")
public class SonHaiTeamData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "分组ID", select = true, update = true)
    private int groupId;

    @FieldTypeAnnotation(desc = "队伍ID")
    private int teamId;

    @FieldTypeAnnotation(desc = "队长ID")
    private long leaderId;

    @FieldTypeAnnotation(desc = "最高镇伏的区域ID")
    private int maxRegionId;

    @FieldTypeAnnotation(desc = "创建时间")
    private long createTime;

    public SonHaiTeamData() {}

    public SonHaiTeamData(SonHaiTeamData teamData) {
        this.activityId = teamData.getActivityId();
        this.groupId = teamData.getGroupId();
        this.teamId = teamData.getTeamId();
        this.leaderId = teamData.getLeaderId();
        this.maxRegionId = teamData.getMaxRegionId();
        this.createTime = teamData.getCreateTime();
    }

    public SonHaiTeamData(int activityId, int groupId, int teamId, long leaderId) {
        this.activityId = activityId;
        this.groupId = groupId;
        this.teamId = teamId;
        this.leaderId = leaderId;
        this.maxRegionId = 0;
        this.createTime = System.currentTimeMillis();
        setInsertOption();
    }

    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        if (this.groupId != groupId) {
            this.groupId = groupId;
            setOp(DataStatus.Update);
        }
    }

    public int getTeamId() {
        return teamId;
    }
    public void setTeamId(int teamId) {
        if (this.teamId != teamId) {
            this.teamId = teamId;
            setOp(DataStatus.Update);
        }
    }

    public long getLeaderId() {
        return leaderId;
    }
    public void setLeaderId(long leaderId) {
        if (this.leaderId != leaderId) {
            this.leaderId = leaderId;
            setOp(DataStatus.Update);
        }
    }

    public int getMaxRegionId() {
        return maxRegionId;
    }

    public void setMaxRegionId(int maxRegionId) {
        if (this.maxRegionId != maxRegionId) {
            this.maxRegionId = maxRegionId;
            setOp(DataStatus.Update);
        }
    }

    public long getCreateTime() {
        return createTime;
    }
    public void setCreateTime(long createTime) {
        if (this.createTime != createTime) {
            this.createTime = createTime;
            setOp(DataStatus.Update);
        }
    }
}
